-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate Historic Data, Showing In Simple Table #94
Conversation
Oops, this is very important
✅ Deploy Preview for radiant-cucurucho-d09bae ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Idea for improvement: Hide columns that never have data (e.g. the Energy Star Score in the PR description screenshot from Merch Mart) since there's no point comparing something with no data at all. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't do a full run through (e.g. all the tests and checking frontend outputs), but can re-review if that becomes an issue. Otherwise the script changes look pretty straightforward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python code lgtm 👍
I think you can commit once you get the merge conflict resolved
// A column is empty if it's all empty string or '0', so skip it if so. Some columns switch | ||
// between both, like Natural Gas Use on Merch Mart, which we also want to ignore | ||
return !this.historicBenchmarks.every((datum) => { | ||
return (datum as any)[colKey] === '' || (datum as any)[colKey] === '0.0'; |
Check warning
Code scanning / ESLint
Disallow the `any` type Warning
// A column is empty if it's all empty string or '0', so skip it if so. Some columns switch | ||
// between both, like Natural Gas Use on Merch Mart, which we also want to ignore | ||
return !this.historicBenchmarks.every((datum) => { | ||
return (datum as any)[colKey] === '' || (datum as any)[colKey] === '0.0'; |
Check warning
Code scanning / ESLint
Disallow the `any` type Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved (again)
Description
Updated the data process to generate a new
benchmarking-all-years.csv
, which contains a smaller set of columns with historic data, so we can see emissions and energy use change over time, and adds a simple table view to render this data. This isn't elegant, but is better than not having the data at all.Demo From Merchandise Mart:
Note: Only columns with any values will be rendered, to reduce noise. So for Merchandise Mart, the Energy Star Score or District Heating is not shown over time.
Resolves #73
Testing Instructions
Confirmed that historical data renders properly on a variety of pages - even if a building only has one year of data, the table should render fine. Also made sure the table works well on mobile by scrolling it horizontally.
Checklist: